<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('修改失效时间')"/>
    <th:block th:include="include :: layout-latest-css"/>
    <th:block th:include="include :: ztree-css"/>
    <th:block th:include="include :: select2-css"/>
</head>
<body>
<div class="main-content">
    <form id="form-job-edit" class="form-horizontal" AUTOCOMPLETE="OFF">
        <input name="id" id="id" type="hidden" th:value="${job.id}"/>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label"><span style="color: red; ">*</span>失效时间：</label>
                    <div class="col-sm-8">
                        <input name="effectDate" id="effectDate" th:value="${job.effectdate}" class="form-control laydate-demo-1"
                               type="text"
                               required />
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>


<th:block th:include="include :: footer"/>
<th:block th:include="include :: select2-js"/>
<th:block th:include="include :: datetimepicker-js"/>
<th:block th:include="include :: bootstrap-suggest-js"/>
<th:block th:include="include :: bootstrap-typeahead-js"/>

<script type="text/javascript">

    var prefix = ctx + "job/admin";

    $(function () {
        layui.use('laydate', function () {
            var laydate = layui.laydate;
            laydate.render({
                elem: '.laydate-demo-1',
                type: 'date'
            });
        });
    });

    function submitHandler() {
        if ($.validate.form()) {
            var data = $("#form-job-edit").serializeArray();
            var id = $("#id").val();
            var effectDate = $("#effectDate").val();

            data.push({"name": "id", "value": id});
            data.push({"name": "effectDate", "value": effectDate});
            $.operate.save(prefix + "/editInvalid", data);
        }
    }

</script>

</body>
</html>